/**
 * @Description 设备输出
 * @method
 * @auth kely
 * @Date 2023-2-20
 * @Param
 * @return
 **/

package responses

import (
	"github.com/edgexfoundry/edgex-go/internal/app/dtos"
	"github.com/edgexfoundry/go-mod-core-contracts/v2/dtos/common"
)

// PcResponse defines the Response Content for GET Device DTOs.
// This object and its properties correspond to the DeviceResponse object in the APIv2 specification:
type PcResponse struct {
	common.BaseResponse `json:",inline"`
	ProductCategory     dtos.ProductCategory `json:"productCategory"`
}

func NewPcResponse(requestId string, message string, statusCode int, productCategory dtos.ProductCategory) PcResponse {
	return PcResponse{
		BaseResponse:    common.NewBaseResponse(requestId, message, statusCode),
		ProductCategory: productCategory,
	}
}

// MultiPcResponse defines the Response Content for GET multiple Device DTOs.
// This object and its properties correspond to the MultiDevicesResponse object in the APIv2 specification:
type MultiPcResponse struct {
	common.BaseWithTotalCountResponse `json:",inline"`
	ProductCategorys                  []dtos.ProductCategory `json:"productCategory"`
}

func NewMultiProductCategorysResponse(requestId string, message string, statusCode int, totalCount uint32, productCategorys []dtos.ProductCategory) MultiPcResponse {
	return MultiPcResponse{
		BaseWithTotalCountResponse: common.NewBaseWithTotalCountResponse(requestId, message, statusCode, totalCount),
		ProductCategorys:           productCategorys,
	}
}
